
********************************************************************************
***   For appendix: alternate specifications (robustness checks)
********************************************************************************

* Dropping partially treated

gen instrument2 = post2*treat2_10_inc
egen instrument2_std = std(instrument2)
drop instrument2
ren instrument2_std instrument2

label var instrument2 "Post $\times$ Intensity"

est clear

foreach var of varlist economic_index information participation_index dem_checks_on_pres {
	
	display " "
	display " "
	display " "
	display "Table A14a: `var'"
	quietly eststo: reg `var' instrument2 i.birthyear_control i.year_survey_control i.locale_gender post2 treat2_10_inc wolof-others if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
	
	noisily: lincom instrument2
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}


* More stringent birthyear cutoffs

foreach var of varlist economic_index information participation_index dem_checks_on_pres {
	
	display " "
	display " "
	display " "
	display "Table A14b: `var'"
	quietly eststo: areg `var' instrument i.birthyear_control i.year_survey_control post1 treat2_10_inc wolof-others urbrur2 male if birthyear_control >= 1975 & birthyear_control <= 1997, absorb(locale_gender) cluster(locale_3_control)
	
	noisily: lincom instrument
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}


* region specific trends

tab RegionCode, gen(region)
foreach var of varlist region* {
	gen `var'_treat = `var'*birthyear
}

foreach var of varlist economic_index information participation_index dem_checks_on_pres {
	
	display " "
	display " "
	display " "
	display "Table A14c: `var'"
	quietly eststo: areg `var' instrument i.birthyear_control i.year_survey_control post1 treat2_10_inc wolof-others urbrur2 male region* if birthyear_control >= 1970 & birthyear_control <= 1997, absorb(locale_gender) cluster(locale_3_control)
	
	noisily: lincom instrument
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}


* 5 year cohorts

gen instrument3 = post1 * treat2_inc
egen instrument3_std = std(instrument3)
drop instrument3
ren instrument3_std instrument3

label var instrument3 "Post $\times$ Intensity"

foreach var of varlist economic_index information participation_index dem_checks_on_pres {
	
	display " "
	display " "
	display " "
	display "Table A14d: `var'"
	quietly eststo: areg `var' instrument3 i.birthyear_control i.year_survey_control post1 treat2_inc wolof-others urbrur2 male if birthyear_control >= 1970 & birthyear_control <= 1997, absorb(locale_gender) cluster(locale_3_control)
	
	noisily: lincom instrument3
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}


* Drop top populated places

xtile pop_quart = population, n(4)

foreach var of varlist economic_index information participation_index dem_checks_on_pres {
	
	display " "
	display " "
	display " "
	display "Table A14e: `var'"
	quietly eststo: areg `var' instrument i.birthyear_control i.year_survey_control post1 treat2_10_inc wolof-others urbrur2 male if birthyear_control >= 1970 & birthyear_control <= 1997 & pop_quart != 4, absorb(locale_gender) cluster(locale_3_control)
	
	noisily: lincom instrument
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}

* Adding age as a control

local economic economic_index employed assets basic_necessities 
local information information interest_pub_affairs_index discuss_pol_index news_scale
local participation participation_index participate_index contact_index 
local dem_checks_on_pres

foreach var of varlist economic_index information participation_index dem_checks_on_pres {
	
	display " "
	display " "
	display " "
	display "Table A14f: `var'"
	quietly eststo: reg `var' instrument i.birthyear_control i.year_survey_control i.locale_gender post1 treat2_10_inc wolof-others age if birthyear_control >= 1970 & birthyear_control <= 1997, cluster(locale_3_control)
	
	noisily: lincom instrument
	quietly: summ `var'
	estadd scalar vmean = r(mean)
}


local numbers "& (1) & (2) & (3) & (4) \\ "
local robust1 "\textbf{Dropping partially treated} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"
local robust2 "\midrule \\ \textbf{Region-specific trends} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"
local robust3 "\midrule \\ \textbf{Using 1975-1997 sample} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"
local robust4 "\midrule \\ \textbf{5 year cohorts} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"
local robust5 "\midrule \\ \textbf{Drop populated CRs} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"
local robust6 "\midrule \\ \textbf{Adding age as a control} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"
local gap ""
local robust7 "\midrule \\ \textbf{Controlling for partisanship} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"
local robust8 "\midrule \\ \textbf{Dropping year dummies} & \multicolumn{1}{c}{Economic index} &  \multicolumn{1}{c}{Interest index}  &  \multicolumn{1}{c}{Participate index}  &  \multicolumn{1}{c}{Checks on pres} \\ \midrule"

esttab est1 est2 est3 est4 using "tables/robustness.tex", replace b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`numbers'" "`robust1'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument2)

esttab est5 est6 est7 est8 using "tables/robustness.tex", append b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust2'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument)

esttab est9 est10 est11 est12 using "tables/robustness.tex", append b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust3'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument)

esttab est13 est14 est15 est16 using "tables/robustness.tex", append b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust4'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument3)

esttab est17 est18 est19 est20 using "tables/robustness.tex", append b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust5'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument)


esttab est21 est22 est23 est24 using "tables/robustness.tex", append b(3) se(3) ar(3) ///
stats(N vmean, fmt(0 3 3 "") labels(`"Observations"' `"DV Mean"')) nonumber posthead("`gap'" "`robust6'") ///
f label nomtitles nogaps booktabs noobs compress star(* 0.10 ** 0.05 *** 0.01) keep(instrument)


